{extends file="../acp.html"}

{block name="title"}{$head_title}{/block}
{block name="content"}
<form id="J_FormNotice" action="/AcpInformation/add_information" method="post">
    <div class="formitems inline">
        <label class="fi-name"><span class="colorRed">*</span>资讯名：</label>
        <div class="form-controls">
            <input type="text" placeholder="" class="xlarge" name="information_name" id="incubator_name" value="{$incubator_info.incubator_name}">
            <span class="fi-help-text hide"></span>
        </div>
    </div>
    <div class="formitems inline">
        <label class="fi-name">是否热门：</label>
        <div class="form-controls">
            <div class="radio-group">
                <label><input type="radio" name="ishot" value="1" {if $service_type_info.isuse == 1}checked="checked"{/if} />是</label>
                <label><input type="radio" name="ishot" value="0" {if $service_type_info.isuse == 0}checked="checked"{/if} />否</label>
            </div>
        </div>
    </div>
    <div class="formitems inline">
        <label class="fi-name"><span class="colorRed">*</span>请选择资讯分类：</label>
        <div class="form-controls">
            <select name="article_sort_id" id="article_sort_id" style="width: 120px">
            <option value="0">-请选择-</option>
            {foreach from=$information_type_list item=information_type}
            <option value="{$information_type.article_sort_id}">{$information_type.article_sort_name}</option>
            {/foreach}
        </select>
            <span class="fi-help-text hide"></span>
        </div>
    </div>
    <div class="formitems inline">
        <label class="fi-name"><span class="colorRed">*</span>显示时间：</label>
        <div class="form-controls">
            <input type="text" autocomplete="off" class="Wdate" name="addtime" value="{if $incubator_info.addtime}{date('Y-m-d H:i:s', $incubator_info.addtime)}{/if}"  onclick="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss'})">
            <span class="fi-help-text hide"></span>
        </div>
    </div>
    <div class="formitems inline">
        <label class="fi-name"><span class="colorRed">*</span>排序号：</label>
        <div class="form-controls">
            <input type="text" placeholder=""  name="sort" id="sort" value="{$incubator_info.sort}">
            <span class="fi-help-text hide"></span>
        </div>
    </div>
    {upload_image_widget($pic_data)}
    <div class="formitems inline">
        <label class="fi-name"><!-- <span class="colorRed">*</span> -->资讯内容：</label>
        <div class="form-controls">
            <textarea name="contents" id="contents" class="large" name="contents">{$incubator_info.describe}</textarea>
            <span class="fi-help-text error"></span>
        </div>
    </div>
    <input type="hidden" name="opt" value="add">
    <input type="hidden" name="incubator_id" value="{$incubator_info.incubator_id}">
    <div class="formitems inline">
        <label class="fi-name"></label>
        <div class="form-controls">
            <button type="submit" class="btn btn-blue"><i class="gicon-check white"></i>保存</button>
        </div>
    </div>
</form>
{/block}

{block name="js"}
<!-- 编辑器 -->
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=BQLHGlffjbXC30bFDcpIQkHIkaxKBBe6"></script>
<script src="__KD__/kindeditor.js?version={$version}" > </script>
<script src="__ACPJS__/AcpItem/add_item_step3.js?version={$version}"></script>
<script charset="utf-8" src="__KD__/kindeditor.js?version={$version}" > </script>
<script charset="utf-8" src="__KD__/lang/zh_CN.js?version={$version}" > </script>
<script type="text/javascript" src="__JS__/jquery/ajaxupload.3.5.js?version={$version}"></script>
<script src="/Public/Plugins/My97DatePicker/WdatePicker.js?version={$version}"></script>
<script type="text/javascript" src="__ACPJS__/AcpNotice/notice_save.js?version={$version}"></script>
<script>
    var lat = '{$incubator_info.latitude}' || '28.1255940';
    var lng = '{$incubator_info.longitude}' || '120.9820840';
    var map;
</script>
<!--<script type="text/javascript" src="__JS__/jquery/jquery.min.js"></script>-->
{literal}
<script>
    $('#province').change(function () {
        var province_id = $("#province").find('option:selected').val();
        console.log(province_id);
        $.ajax({
            type:'post',
            url: '/AcpIncubator/getcity',
            data: {province_id: province_id},
            dataType:'json',
            success: function(data){
                //console.log(data);
                var len =data.length;
                var i=0;
                var html='';
                for(i=0;i<len;i++){
                    html+= ' <option value="'+data[i].city_id +'">'+data[i].city_name+'</option>';
                }
                $("#city").html(html);
            }
        });
    });

</script>
{/literal}
<!--<script type="text/javascript" src="__JS__/jquery/jquery.min.js"></script>-->
{/block}

{block name="css"}
<link rel="stylesheet" href="__KD__/themes/default/default.css" />
<link rel="stylesheet" href="/Public/Css/acp/AcpNotice/add_notice.css"  type="text/css"/>
{/block}


